import request from '@/utils/request_axios'
// 查询工作流
export function queryActiveList(data) {
  return request({
    url: '/act/activit/select',
    method: 'get',
    data
  })
}
// 审核
export function addAxtive(data) {
  return request({
    url: '/daily/record/completeProcess',
    method: 'post',
    data
  })
}
// 查询单个日报
export function getDaily(id) {
  return request({
    url: '/daily/record',
    method: 'get',
    show: true,
    data: {
      id
    }
  })
}
// 编辑日报
export function editDaily(data) {
  return request({
    url: '/daily/record/saveDaily',
    method: 'post',
    data
  })
}
// 查询日报
export function getTemplate(data) {
  return request({
    url: '/daily/Template/getAll',
    method: 'get',
    data
  })
}
// 日报模板新增
export function addTemplate(data) {
  return request({
    url: '/daily/Template/add',
    method: 'post',
    data
  })
}
// 日报模板修改
export function updateTemplate(data) {
  return request({
    url: '/daily/Template/update',
    method: 'put',
    data
  })
}
// 日报模板删除
export function deleteTemplate(id) {
  return request({
    url: '/daily/Template/delete',
    method: 'delete',
    show: true,
    data: {
      id
    }
  })
}
// 日报模板查询单个
export function getDTemplate(id) {
  return request({
    url: '/daily/Template/get',
    method: 'get',
    show: true,
    data: {
      id
    }
  })
}
// 日报列表查询
export function queryDailyRecord(data) {
  return request({
    url: '/daily/record/page',
    method: 'get',
    data
  })
}
// 日报列表详情
export function queryDetailrecord(id) {
  return request({
    url: '/daily/record',
    method: 'get',
    show: true,
    data: {
      id
    }
  })
}
// 查询日报记录
export function queryRecordReceive(data) {
  return request({
    url: '/daily/receive',
    method: 'get',
    data
  })
}
// 日报记录删除
export function deleteRecordReceive(id) {
  return request({
    url: '/daily/receive',
    method: 'delete',
    show: true,
    data: {
      id
    }
  })
}
// 查询日报记录导出
export function recordImport(data) {
  return request({
    url: '/daily/receive/export',
    method: 'post',
    data,
    responseType: 'blob'
  })
}
// 查询参数配置
export function queryConfig(data, methods) {
  let method = ''
  if (methods === 'get') {
    method = 'get'
  } else if (methods === 'post') {
    method = 'post'
  } else if (methods === 'put') {
    method = 'put'
  }
  return request({
    url: '/sys/configs',
    method: method,
    data: data
  })
}
// 查询参数配置
export function queryConfigDetail(id) {
  return request({
    url: '/sys/configs',
    method: 'get',
    show: true,
    data: {
      id
    }
  })
}
export function deleteConfig(id) {
  return request({
    url: '/sys/configs',
    method: 'delete',
    show: true,
    data: {
      id
    }
  })
}
// 日报参数配置-通讯轮
export function queryConfigDatily(data, methods) {
  let method = ''
  if (methods === 'get') {
    method = 'get'
  } else if (methods === 'post') {
    method = 'post'
  } else if (methods === 'put') {
    method = 'put'
  }
  return request({
    url: '/daily/config',
    method: method,
    data: data
  })
}
// 日报参数配置-通讯轮
export function queryConfigList(data) {
  return request({
    url: '/daily/config',
    method: 'get',
    data: data
  })
}
// 日报参数配置-彩信配置
export function queryConfigMms(data, methods) {
  let method = ''
  if (methods === 'get') {
    method = 'get'
  } else if (methods === 'post') {
    method = 'post'
  } else if (methods === 'put') {
    method = 'put'
  }
  return request({
    url: '/daily/config/mms-config',
    method: method,
    data: data
  })
}
// 日报参数配置-语音配置
export function queryConfigVocie(data, methods) {
  let method = ''
  if (methods === 'get') {
    method = 'get'
  } else if (methods === 'post') {
    method = 'post'
  } else if (methods === 'put') {
    method = 'put'
  }
  return request({
    url: '/daily/config/coice-config',
    method: method,
    data: data
  })
}
// 日报模板启用禁用
export function queryConfigStatus(id) {
  return request({
    url: '/daily/Template/enable',
    method: 'get',
    show: true,
    data: {
      id
    }
  })
}

// 流程日志查询
export function queryProcess(data) {
  return request({
    url: '/daily/progress/days',
    method: 'get',
    data: data
  })
}
// 流程日志查询详情
export function progressDetails(data) {
  return request({
    url: '/daily/progress',
    method: 'get',
    data: data
  })
}
// 流程日志查询详情
export function progressConfig(data) {
  return request({
    url: '/daily/config/video-config',
    method: 'post',
    data: data
  })
}
// 流程日志审批
export function progressCompletegl(data) {
  return request({
    url: '/daily/record/completegl',
    method: 'post',
    data: data
  })
}
